"""
@Author：WangYuXiang
@E-mile：Hill@3io.cc
@CreateTime：2021/4/22 14:47
@DependencyLibrary：无
@MainFunction：无
@FileDoc： 
    models.py
    文件说明
@ChangeHistory:
    datetime action why
    example:
    2021/4/22 14:47 change 'Fix bug'
        
"""
from tortoise.fields import CharField, ForeignKeyField, IntField

from common.utils.models import BaseModel


class WeChatModel(BaseModel):

    name = CharField(50, description='公众号名称')
    key = CharField(8, description='回复码')
    value = CharField(4, description='回复码')


class VideoSeriesModel(BaseModel):
    name = CharField(50, description='系列名称')


class VideosModel(BaseModel):

    videos_path = CharField(500, description='视频文件地址')
    videos_url = CharField(500, description='视频网络地址')
    desc = CharField(300, description='视频描述')

    preview = CharField(500, description='预览图片地址')

    series = ForeignKeyField('videos.VideoSeriesModel', related_name='videos', null=True)
